﻿<%@ Page Language="C#"  MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true" CodeFile="MyConsult.aspx.cs" Inherits="Home_MyConsult" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" Runat="Server">
  <title>我的咨询</title>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<div id="bulkRight">
    <div class="titleSix">我的咨询</div>
  <script type="text/javascript">
      function goPage(page) {
          window.location.href = "/home/mysonsult.aspx?page=" + page; ;
      }
  </script>
  <div class="orderInfor">
   
   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="orderstable">
                <tr    class="orderTr" >
  <td height="25" align="center" class="orderTdOne">商品名称</td>
    <td height="25" align="center" class="orderTdOne">咨询内容</td>
    <td height="25" align="center" class="orderTdOne">咨询时间</td>
    <td height="25" align="center" class="orderTdOne">回复内容</td>
    <td height="25" align="center" class="orderTdOne">回复时间</td>
  </tr>
 <%if (_goodsConsultList != null && _goodsConsultList.Count > 0)
   {
       for (var i = 0; i < _goodsConsultList.Count; i++)
       { %>
                <tr class="orderTr">
                     <td height="25" align="center"  class="orderTdTwo"><%=_goodsConsultList[i].GoodsName%></td>
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsConsultList[i].Consult.ConsultContent%>
                    </td>
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsConsultList[i].Consult.ConsultDate%>
                    </td>
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsConsultList[i].Consult.ReplyContent%>
                    </td>
                    <td height="25" align="center" class="orderTdTwo">
                        <%=_goodsConsultList[i].Consult.ReplyDate%>
                    </td>
                </tr>
                <%}
       if (asPage.TotalCount > _pageSize)
       {
           var totalPage = asPage.TotalCount % _pageSize == 0 ? asPage.TotalCount / _pageSize : (asPage.TotalCount / _pageSize + 1);
                %>
                <tr class="orderTr">
                    <td colspan="5"  class="orderTdTwo">
                        <a href="javascript:void(0);" onclick="goPage(<%=asPage.CurPage-1>0?asPage.CurPage-1:0 %>);">
                            [上一页]</a> <a href="javascript:void(0);" onclick="goPage(<%=asPage.CurPage+1>totalPage?totalPage:(asPage.CurPage+1) %>);">
                                [下一页]</a>
                    </td>
                </tr>
                <%
     }

   }
   else
   { %>
    <tr class="orderTr">
                    <td colspan="5"  class="orderTdTwo">
                       [ 您还没有发布任何商品咨询信息！]
                    </td>
                </tr>

    <%} %>
</table>


  </div>

    
  </div>
</asp:Content>
